<?php
	namespace Admin\Model;
	use Think\Model;
	class OrderModel extends Model{

		/**
		 * 计算订单的价格
		 * @param  $trade_on
		 * @author tiedong
		 * @date 2018-01-29
		 */
        public function getSum($trade_on)
        {
        	if(empty($trade_on)) return false;
			$sql = "SELECT SUM(amount) as cnt FROM lr_order WHERE trade_no='$trade_on'";
            $result = current($this->query($sql));
			return $result['cnt'];
		}
	}
?>
